www.gusucode.com > 环保时代家庭财务管理系统 EPffms v4.0 > 环保时代家庭财务管理系统 EPffms v4.0\code\eptimehome\diary\diary.asp
<!-- #include file="../conn.asp" --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <link href="../images/admin.css" rel="stylesheet" type="text/css" /> <title>无标题文档</title> <script> function test() { if(!confirm('确认删除本信息吗?')) return false; } </script> <script language="javascript"> <!-- function check(){ var notnull; notnull=true; if (document.form1.content.value==""){ alert("请输入回复的内容"); document.form1.content.focus(); notnull=false; } return notnull; } function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> </head> <body> <!--当前导航--> <script type="text/JavaScript">if(parent.$('admincpnav')) parent.$('admincpnav').innerHTML='首页 » 理财日记 » 我的日记';</script> <% set rs = server.CreateObject("adodb.recordset") if request.QueryString("act") = "showlist" then Dim str select case request.QueryString("class") case "" str = "EP_id desc" case "timed" str = "EP_date desc" case "timea" str = "EP_date asc" end select %> <form id="form2" name="form2" method="post" action="?act=all"> <table width="800" height="40" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="120" align="center" height="40"> </td> <td width="580" align="center" style="font-size:14px;color:#009900;font-weight:bold;">我 的 理 财 日 记 列 表</td> <td width="100" align="center" ><select name="menu1" class="font_heise_12" onchange="MM_jumpMenu('self',this,0)"> <option value="请选择">请选择</option> <option value="?act=showlist&class=timed">按发表时间降序排序</option> <option value="?act=showlist&class=timea">按发表时间升序排序</option> </select></td> </tr> </table> <table width="800" height="60" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#3399CC" class="font_bg"> <tr > <td width="6%" height="30" align="center" style="font-size:14px;color:#009900;">ID</td> <td width="44%" align="center" style="font-size:14px;color:#009900;">标题</td> <td width="14%" align="center" style="font-size:14px;color:#009900;">日期</td> <td width="10%" align="center" style="font-size:14px;color:#009900;">作者</td> <td width="10%" align="center" style="font-size:14px;color:#009900;">回复状态</td> <td width="10%" align="center" style="font-size:14px;color:#009900;">功能</td> <td width="6%" align="center" style="font-size:14px;color:#009900;">状态</td> </tr> <% EP_Sql = "select * from Eptime_diary where ep_author="&request.Cookies("UserID")&" order by " & str rs.open EP_sql ,conn,1,1 if rs.eof then response.Write("暂无记录,请添加"):response.End() if request("page") <> "" then page=clng(request("page")) else page = 0 end if rs.PageSize=10 if page=0 then page=1 pages=rs.pagecount if page > pages then page=pages rs.AbsolutePage=page for j =1 to rs.pagesize %> <tr> <td height="30" align="center" class="font_heise_12"><%=rs("EP_id")%></td> <td align="left" id="Eptime_diary1"> <% if len(rs("EP_title")) > 15 then response.Write("<a href='list.asp?id="& rs("EP_id") &"'>" & left(rs("EP_title"),15) & "...</a>") else response.Write("<a href='list.asp?id="& rs("EP_id") &"'>" & rs("EP_title") & "</a>") end if %></td> <td align="center" class="font_heise_12"><%=rs("EP_date")%></td> <td align="center" class="font_heise_12"> <% sql="select * from Eptime_admin where id="&rs("ep_author") set rs_login=conn.execute(sql) %> <%if rs_login.eof then%><%=rs("ep_author")%><%else%><%=rs_login("realname")%><%end if%></td> <% set rsc = conn.execute("select count(*) from Eptime_diary_reply where EP_diaryid=" & rs("EP_id")) if rsc(0) >0 then %> <td align="center" id="EP_book"> 有 </td> <% else %> <td align="center" id="EP_book1"> 无 </td> <%end if%> <td align="center" class="font_heise_12"> <a href="add.asp?id=<%=rs("EP_id")%>">修改</a> <a href="?act=del&id=<%=rs("EP_id")%>" onclick='return test();'>删除</a> </td> <% if rs("EP_ok") = 0 then %> <td align="center" class="font_heise_12"><a href="?ok=1&id=<%=rs("EP_id")%>" title='点击设置为公开'>保密</a></td> <% elseif rs("EP_ok") = 1 then %> <td align="center" class="STYLE1a"><a href="?ok=0&id=<%=rs("EP_id")%>" title='点击设置为保密'>公开</a></td> <% end if %> </tr> <% rs.movenext if rs.eof then exit for next %> <tr> <td colspan="7" align="center" height="30"><a href="?act=showlist&page=1">首页</a> <a href="?act=showlist&page=<%=page-1%>">上一页</a> <% for i=1 to rs.pagecount response.Write("<a href='?act=showlist&page="& i &"'>" & i & "</a>" & " ") next %> <a href="?act=showlist&page=<%=page+1%>">下一页</a> <a href="?act=showlist&page=<%=rs.pagecount%>">尾页</a> </td> </tr> </table> </form> <% elseif request.QueryString("ok") <> "" Then if clng(request.QueryString("ok")) = 1 And request.QueryString("ok")<>"" then conn.execute("update Eptime_diary set EP_ok=1 where EP_id=" & request.QueryString("id")) call showmessage("设置成功!","?act=showlist") ElseIf clng(request.QueryString("ok")) = 0 And request.QueryString("ok")<>"" Then conn.execute("update Eptime_diary set EP_ok=0 where EP_id=" & request.QueryString("id")) call showmessage("设置成功!","?act=showlist") Else call showmessage("参数错误!","?act=showlist") end if elseif request.QueryString("act") = "del" then conn.execute("delete * from Eptime_diary where EP_id=" & request.QueryString("id")) Call showmessage("成功删除!","diary.asp?act=showlist") end if Call closeconn() sub closeconn() conn.close() set conn =nothing end Sub Sub showmessage(LX_str,LX_address) Response.Write("<script>alert('"& LX_str &"');location.href='"& LX_address &"'</script>") End Sub %> </body> </html>